#!/bin/bash

BASE_DIR=/mnt/scratch0/valankar
export PYTHONPATH=$BASE_DIR/django-sites
export DJANGO_SETTINGS_MODULE=movie.settings

cd $BASE_DIR/django-sites/movie/tools

# Mount
$BASE_DIR/bin/mount_mini.sh

# Import new movies
./import_movies.py

# Unmount
$BASE_DIR/bin/umount_mini.sh

# Update reviews
./update_reviews.py -d 30 -s

# Update review average scores
./update_review_scores.py

# Recalculate tallies
./update_tallies.py

# Add trailers
./update_trailers.py
